function plotcloth(array,Restlength)
% Plot the cloth

tensor=array2tensor(array);
X=tensor(:,:,1);
Y=tensor(:,:,2);
Z=tensor(:,:,3);
cla
surfcloth(X,Y,Z,Restlength);
